using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Api_Backstage.Code;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace Api.Controllers
{
    /// <summary>
    /// 用户模块
    /// </summary>
    [Route("api/[controller]")]
    public class NoticeController : Controller
    {
        /// <summary>
        /// 用户登录
        /// </summary>
        /// <returns></returns>
        [HttpPost("message/soical/list")]
        [AuthAttribute]
        public ActionResult<Model.Result<List<Model.ApiResult.NoticeResult.FriendsNoticeInfo>>> GetUserSoicalMessageList()
        {
            return Json(new BLL.Manage.NoticeManage().GetSoicalMessageList(0, 0));
        }

        /// <summary>
        /// 单对单聊天发送聊天消息
        /// </summary>
        /// <param name="roomId">房间ID</param>
        /// <param name="content">消息内容</param>
        /// <param name="contentType">消息类型 1：text  2：图片   3：语音   4：视屏</param>
        /// <returns></returns>
        [HttpPost("message/soical/send/friend")]
        [AuthAttribute]
        public ActionResult<Model.Result<Model.Entity.ChatMessage>> FriendSendMessage(string roomId, string content, int contentType)
        {
            return Json(new BLL.Manage.NoticeManage().SendSoicalMessageToFriend(roomId, content, contentType));
        }
    }
}
